d2997f8cf9e4ddcc70c82b943efc80e70ad9c7fe,xwiki-platform-core/xwiki-platform-annotations/xwiki-platform-annotation-io/src/main/java/org/xwiki/annotation/rights/internal/XWikiAnnotationRightService.java,XWikiAnnotationRightService,canEditAnnotation,#String#String#String#,98
Before Change
public boolean canEditAnnotation(String annotationId, String target, String userName)
{
// if the user has edit right on the document represented by the target, or is the author of the annotation
XWikiContext xwikiContext = getXWikiContext();
try {
boolean hasEditRight =
xwikiContext.getWiki().getRightService().hasAccessLevel("edit", userName, getDocumentReference(target),
xwikiContext);
if (hasEditRight) {
return true;
}
After Change
}
@Override
public boolean canEditAnnotation(String annotationId, String target, String userName)
{
// if the user has edit right on the document represented by the target, or is the author of the annotation
try {
boolean hasEditRight =
this.authorization.hasAccess(Right.EDIT, getUserReference(userName), getDocumentReference(target));
if (hasEditRight) {
return true;
}